﻿using System.Collections.Generic;
using System.Linq;
using System.Web.UI;

namespace VotanetWebSite.Classes
{
    public sealed class Util
    {
        public static IEnumerable<Control> FindControlRecursive(Control mControl)
        {
            foreach (Control cc in mControl.Controls.AsParallel())
            {
                yield return cc;
                foreach (Control c in FindControlRecursive(cc).AsParallel())
                {
                    yield return c;
                }
            }
        }
    }
}